package com.sasis.webapp.dwr;


import java.util.Iterator;
import java.util.List;



import com.sasis.model.PassengerInfo;

import com.sasis.service.PassengerInfoManager;

public class PassengerInfoRemote {
   private PassengerInfoManager passengerInfoManager;

public void setPassengerInfoManager(
		PassengerInfoManager passengerInfoManager) {
	this.passengerInfoManager = passengerInfoManager;
}
   public PassengerInfo search(String etNumber,String flightInfoId){
	   PassengerInfo passengerInfo=new PassengerInfo();
	   passengerInfo.setEtNumber(etNumber);
	   passengerInfo.setFlightInfoId(new Integer(flightInfoId));
	  List list=passengerInfoManager.getPassengerInfos(passengerInfo);
	  Iterator it=list.iterator();
	  if(it.hasNext())
		  passengerInfo=(PassengerInfo)it.next();
	  return passengerInfo;
	 }
}
